home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / CMICCProfile.p < prev    next >
Text File  |  1996-05-01  |  25KB  |  738 lines

  1. {
  2.      File:        CMICCProfile.p
  3.  
  4.      Contains:    Definitions for ColorSync 2.0 profile
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT CMICCProfile;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __CMICCPROFILE__}
  28. {$SETC __CMICCPROFILE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC CMICCProfileIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42. {  Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01  }
  43.  
  44. CONST
  45.     cmCS2ProfileVersion            = $02000000;
  46.  
  47. {  Current Major version number  }
  48.     cmCurrentProfileMajorVersion = $02000000;
  49.  
  50. {  magic cookie number for anonymous file ID  }
  51.     cmMagicNumber                = 'acsp';
  52.  
  53. {  ColorSync profile version 1.0  }
  54.     cmCS1ProfileVersion            = $00000100;
  55.  
  56. { ********************************************************************** }
  57. { ************** ColorSync 2.0 profile specification ******************* }
  58. { ********************************************************************** }
  59. {  profile flags element values  }
  60.     cmEmbeddedProfile            = 0;                            {  0 is not embedded profile, 1 is embedded profile  }
  61.     cmEmbeddedUse                = 1;                            {  0 is to use anywhere, 1 is to use as embedded profile only  }
  62.  
  63. {  data type element values  }
  64.     cmAsciiData                    = 0;
  65.     cmBinaryData                = 1;
  66.  
  67. {  rendering intent element values   }
  68.     cmPerceptual                = 0;                            {  Photographic images  }
  69.     cmRelativeColorimetric        = 1;                            {  Logo Colors  }
  70.     cmSaturation                = 2;                            {  Business graphics  }
  71.     cmAbsoluteColorimetric        = 3;                            {  Logo Colors  }
  72.  
  73. {  speed and quality flag options  }
  74.     cmNormalMode                = 0;                            {  it uses the least significent two bits in the high word of flag  }
  75.     cmDraftMode                    = 1;                            {  it should be evaulated like this: right shift 16 bits first, mask off the  }
  76.     cmBestMode                    = 2;                            {  high 14 bits, and then compare with the enum to determine the option value  }
  77.  
  78. {  device/media attributes element values   }
  79.     cmReflective                = 0;                            {  0 is reflective media, 1 is transparency media  }
  80.     cmGlossy                    = 1;                            {  0 is glossy, 1 is matte  }
  81.  
  82. {  screen encodings   }
  83.     cmPrtrDefaultScreens        = 0;                            {  Use printer default screens.  0 is false, 1 is ture  }
  84.     cmLinesPer                    = 1;                            {  0 is LinesPerCm, 1 is LinesPerInch  }
  85.  
  86. {  2.0 tag type information  }
  87.     cmNumHeaderElements            = 10;
  88.  
  89. {  public tags  }
  90.     cmAToB0Tag                    = 'A2B0';
  91.     cmAToB1Tag                    = 'A2B1';
  92.     cmAToB2Tag                    = 'A2B2';
  93.     cmBlueColorantTag            = 'bXYZ';
  94.     cmBlueTRCTag                = 'bTRC';
  95.     cmBToA0Tag                    = 'B2A0';
  96.     cmBToA1Tag                    = 'B2A1';
  97.     cmBToA2Tag                    = 'B2A2';
  98.     cmCalibrationDateTimeTag    = 'calt';
  99.     cmCharTargetTag                = 'targ';
  100.     cmCopyrightTag                = 'cprt';
  101.     cmDeviceMfgDescTag            = 'dmnd';
  102.     cmDeviceModelDescTag        = 'dmdd';
  103.     cmGamutTag                    = 'gamt';
  104.     cmGrayTRCTag                = 'kTRC';
  105.     cmGreenColorantTag            = 'gXYZ';
  106.     cmGreenTRCTag                = 'gTRC';
  107.     cmLuminanceTag                = 'lumi';
  108.     cmMeasurementTag            = 'meas';
  109.     cmMediaBlackPointTag        = 'bkpt';
  110.     cmMediaWhitePointTag        = 'wtpt';
  111.     cmNamedColorTag                = 'ncol';
  112.     cmNamedColor2Tag            = 'ncl2';
  113.     cmPreview0Tag                = 'pre0';
  114.     cmPreview1Tag                = 'pre1';
  115.     cmPreview2Tag                = 'pre2';
  116.     cmProfileDescriptionTag        = 'desc';
  117.     cmProfileSequenceDescTag    = 'pseq';
  118.     cmPS2CRD0Tag                = 'psd0';
  119.     cmPS2CRD1Tag                = 'psd1';
  120.     cmPS2CRD2Tag                = 'psd2';
  121.     cmPS2CRD3Tag                = 'psd3';
  122.     cmPS2CSATag                    = 'ps2s';
  123.     cmPS2RenderingIntentTag        = 'ps2i';
  124.     cmRedColorantTag            = 'rXYZ';
  125.     cmRedTRCTag                    = 'rTRC';
  126.     cmScreeningDescTag            = 'scrd';
  127.     cmScreeningTag                = 'scrn';
  128.     cmTechnologyTag                = 'tech';
  129.     cmUcrBgTag                    = 'bfd ';
  130.     cmViewingConditionsDescTag    = 'vued';
  131.     cmViewingConditionsTag        = 'view';
  132.  
  133. {  custom tags  }
  134.     cmPS2CRDVMSizeTag            = 'psvm';
  135.  
  136. {  technology tag descriptions  }
  137.     cmTechnologyFilmScanner        = 'fscn';
  138.     cmTechnologyReflectiveScanner = 'rscn';
  139.     cmTechnologyInkJetPrinter    = 'ijet';
  140.     cmTechnologyThermalWaxPrinter = 'twax';
  141.     cmTechnologyElectrophotographicPrinter = 'epho';
  142.     cmTechnologyElectrostaticPrinter = 'esta';
  143.     cmTechnologyDyeSublimationPrinter = 'dsub';
  144.     cmTechnologyPhotographicPaperPrinter = 'rpho';
  145.     cmTechnologyFilmWriter        = 'fprn';
  146.     cmTechnologyVideoMonitor    = 'vidm';
  147.     cmTechnologyVideoCamera        = 'vidc';
  148.     cmTechnologyProjectionTelevision = 'pjtv';
  149.     cmTechnologyCRTDisplay        = 'CRT ';
  150.     cmTechnologyPMDisplay        = 'PMD ';
  151.     cmTechnologyAMDisplay        = 'AMD ';
  152.     cmTechnologyPhotoCD            = 'KPCD';
  153.     cmTechnologyPhotoImageSetter = 'imgs';
  154.     cmTechnologyGravure            = 'grav';
  155.     cmTechnologyOffsetLithography = 'offs';
  156.     cmTechnologySilkscreen        = 'silk';
  157.     cmTechnologyFlexography        = 'flex';
  158.  
  159. {  type signatures  }
  160.     cmSigCurveType                = 'curv';
  161.     cmSigDataType                = 'data';
  162.     cmSigDateTimeType            = 'dtim';
  163.     cmSigLut16Type                = 'mft2';
  164.     cmSigLut8Type                = 'mft1';
  165.     cmSigMeasurementType        = 'meas';
  166.     cmSigNamedColorType            = 'ncol';
  167.     cmSigNamedColor2Type        = 'ncl2';
  168.     cmSigProfileDescriptionType    = 'desc';
  169.     cmSigScreeningType            = 'scrn';
  170.     cmSigS15Fixed16Type            = 'sf32';
  171.     cmSigSignatureType            = 'sig ';
  172.     cmSigTextType                = 'text';
  173.     cmSigU16Fixed16Type            = 'uf32';
  174.     cmSigU1Fixed15Type            = 'uf16';
  175.     cmSigUInt32Type                = 'ui32';
  176.     cmSigUInt64Type                = 'ui64';
  177.     cmSigUInt8Type                = 'ui08';
  178.     cmSigViewingConditionsType    = 'view';
  179.     cmSigXYZType                = 'XYZ ';
  180.  
  181. {  Measurement type encodings  }
  182. {  Measurement Flare  }
  183.     cmFlare0                    = $00000000;
  184.     cmFlare100                    = $00000001;
  185.  
  186. {  Measurement Geometry     }
  187.     cmGeometryUnknown            = $00000000;
  188.     cmGeometry045or450            = $00000001;
  189.     cmGeometry0dord0            = $00000002;
  190.  
  191. {  Standard Observer     }
  192.     cmStdobsUnknown                = $00000000;
  193.     cmStdobs1931TwoDegrees        = $00000001;
  194.     cmStdobs1964TenDegrees        = $00000002;
  195.  
  196. {  Standard Illuminant  }
  197.     cmIlluminantUnknown            = $00000000;
  198.     cmIlluminantD50                = $00000001;
  199.     cmIlluminantD65                = $00000002;
  200.     cmIlluminantD93                = $00000003;
  201.     cmIlluminantF2                = $00000004;
  202.     cmIlluminantD55                = $00000005;
  203.     cmIlluminantA                = $00000006;
  204.     cmIlluminantEquiPower        = $00000007;
  205.     cmIlluminantF8                = $00000008;
  206.  
  207. {  Spot Function Value  }
  208.     cmSpotFunctionUnknown        = 0;
  209.     cmSpotFunctionDefault        = 1;
  210.     cmSpotFunctionRound            = 2;
  211.     cmSpotFunctionDiamond        = 3;
  212.     cmSpotFunctionEllipse        = 4;
  213.     cmSpotFunctionLine            = 5;
  214.     cmSpotFunctionSquare        = 6;
  215.     cmSpotFunctionCross            = 7;
  216.  
  217. {  Color Space Signatures  }
  218.     cmXYZData                    = 'XYZ ';
  219.     cmLabData                    = 'Lab ';
  220.     cmLuvData                    = 'Luv ';
  221.     cmYxyData                    = 'Yxy ';
  222.     cmRGBData                    = 'RGB ';
  223.     cmGrayData                    = 'GRAY';
  224.     cmHSVData                    = 'HSV ';
  225.     cmHLSData                    = 'HLS ';
  226.     cmCMYKData                    = 'CMYK';
  227.     cmCMYData                    = 'CMY ';
  228.     cmMCH5Data                    = 'MCH5';
  229.     cmMCH6Data                    = 'MCH6';
  230.     cmMCH7Data                    = 'MCH7';
  231.     cmMCH8Data                    = 'MCH8';
  232.  
  233. {  profileClass enumerations  }
  234.     cmInputClass                = 'scnr';
  235.     cmDisplayClass                = 'mntr';
  236.     cmOutputClass                = 'prtr';
  237.     cmLinkClass                    = 'link';
  238.     cmAbstractClass                = 'abst';
  239.     cmColorSpaceClass            = 'spac';
  240.  
  241. {  platform enumerations  }
  242.     cmMacintosh                    = 'APPL';
  243.     cmMicrosoft                    = 'MSFT';
  244.     cmSolaris                    = 'SUNW';
  245.     cmSiliconGraphics            = 'SGI ';
  246.     cmTaligent                    = 'TGNT';
  247.  
  248. {  ColorSync 1.0 elements  }
  249.     cmCS1ChromTag                = 'chrm';
  250.     cmCS1TRCTag                    = 'trc ';
  251.     cmCS1NameTag                = 'name';
  252.     cmCS1CustTag                = 'cust';
  253.  
  254. {  General element data types  }
  255.  
  256. TYPE
  257.     CMDateTimePtr = ^CMDateTime;
  258.     CMDateTime = RECORD
  259.         year:                    INTEGER;
  260.         month:                    INTEGER;
  261.         dayOfTheMonth:            INTEGER;
  262.         hours:                    INTEGER;
  263.         minutes:                INTEGER;
  264.         seconds:                INTEGER;
  265.     END;
  266.  
  267.     CMFixedXYZColorPtr = ^CMFixedXYZColor;
  268.     CMFixedXYZColor = RECORD
  269.         X:                        Fixed;
  270.         Y:                        Fixed;
  271.         Z:                        Fixed;
  272.     END;
  273.  
  274.     CMXYZComponent                        = INTEGER;
  275.     CMXYZColorPtr = ^CMXYZColor;
  276.     CMXYZColor = RECORD
  277.         X:                        CMXYZComponent;
  278.         Y:                        CMXYZComponent;
  279.         Z:                        CMXYZComponent;
  280.     END;
  281.  
  282.     CM2HeaderPtr = ^CM2Header;
  283.     CM2Header = RECORD
  284.         size:                    LONGINT;                                {  This is the total size of the Profile  }
  285.         CMMType:                OSType;                                    {  CMM signature,  Registered with CS2 consortium   }
  286.         profileVersion:            LONGINT;                                {  Version of CMProfile format  }
  287.         profileClass:            OSType;                                    {  input, display, output, devicelink, abstract, or color conversion profile type  }
  288.         dataColorSpace:            OSType;                                    {  color space of data  }
  289.         profileConnectionSpace:    OSType;                                    {  profile connection color space  }
  290.         dateTime:                CMDateTime;                                {  date and time of profile creation  }
  291.         CS2profileSignature:    OSType;                                    {  'acsp' constant ColorSync 2.0 file ID  }
  292.         platform:                OSType;                                    {  primary profile platform, Registered with CS2 consortium  }
  293.         flags:                    LONGINT;                                {  profile flags  }
  294.         deviceManufacturer:        OSType;                                    {  Registered with ICC consortium  }
  295.         deviceModel:            LONGINT;                                {  Registered with ICC consortium  }
  296.         deviceAttributes:        ARRAY [0..1] OF LONGINT;                {  Attributes like paper type  }
  297.         renderingIntent:        LONGINT;                                {  preferred rendering intent of tagged object  }
  298.         white:                    CMFixedXYZColor;                        {  profile illuminant  }
  299.         creator:                OSType;                                    {  profile creator  }
  300.         reserved:                PACKED ARRAY [0..43] OF CHAR;            {  reserved for future use  }
  301.     END;
  302.  
  303.     CMTagRecordPtr = ^CMTagRecord;
  304.     CMTagRecord = RECORD
  305.         tag:                    OSType;                                    {  Registered with CS2 consortium  }
  306.         elementOffset:            LONGINT;                                {  Relative to start of CMProfile  }
  307.         elementSize:            LONGINT;
  308.     END;
  309.  
  310.     CMTagElemTablePtr = ^CMTagElemTable;
  311.     CMTagElemTable = RECORD
  312.         count:                    LONGINT;
  313.         tagList:                ARRAY [0..0] OF CMTagRecord;            {  Variable size  }
  314.     END;
  315.  
  316. {  External 0x02002001 CMProfile  }
  317.     CM2ProfilePtr = ^CM2Profile;
  318.     CM2Profile = RECORD
  319.         header:                    CM2Header;
  320.         tagTable:                CMTagElemTable;
  321.         elemData:                SInt8;                                    {  Tagged element storage. Variable size  }
  322.     END;
  323.  
  324.     CM2ProfileHandle                    = ^CM2ProfilePtr;
  325. {  Tag Type Definitions  }
  326.     CMCurveTypePtr = ^CMCurveType;
  327.     CMCurveType = RECORD
  328.         typeDescriptor:            OSType;                                    {  'curv'  }
  329.         reserved:                LONGINT;                                {  fill with 0x00  }
  330.         countValue:                LONGINT;                                {  number of entries in table that follows  }
  331.         data:                    ARRAY [0..0] OF INTEGER;                {  Tagged element storage. Variable size  }
  332.     END;
  333.  
  334.     CMDataTypePtr = ^CMDataType;
  335.     CMDataType = RECORD
  336.         typeDescriptor:            OSType;                                    {  'data'  }
  337.         reserved:                LONGINT;                                {  fill with 0x00  }
  338.         dataFlag:                LONGINT;                                {  0 = ASCII, 1 = binary  }
  339.         data:                    SInt8;                                    {  Tagged element storage. Variable size  }
  340.     END;
  341.  
  342.     CMDateTimeTypePtr = ^CMDateTimeType;
  343.     CMDateTimeType = RECORD
  344.         typeDescriptor:            OSType;                                    {  'dtim'  }
  345.         reserved:                LONGINT;
  346.         dateTime:                CMDateTime;
  347.     END;
  348.  
  349.     CMLut16TypePtr = ^CMLut16Type;
  350.     CMLut16Type = RECORD
  351.         typeDescriptor:            OSType;                                    {  'mft2'  }
  352.         reserved:                LONGINT;                                {  fill with 0x00  }
  353.         inputChannels:            SInt8;                                    {  Number of input channels  }
  354.         outputChannels:            SInt8;                                    {  Number of output channels  }
  355.         gridPoints:                SInt8;                                    {  Number of clutTable grid points  }
  356.         reserved2:                SInt8;                                    {  fill with 0x00  }
  357.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  358.         inputTableEntries:        INTEGER;                                {   }
  359.         outputTableEntries:        INTEGER;                                {   }
  360.         inputTable:                ARRAY [0..0] OF INTEGER;                {  Variable size  }
  361.         CLUT:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  362.         outputTable:            ARRAY [0..0] OF INTEGER;                {  Variable size  }
  363.     END;
  364.  
  365.     CMLut8TypePtr = ^CMLut8Type;
  366.     CMLut8Type = RECORD
  367.         typeDescriptor:            OSType;                                    {  'mft1'  }
  368.         reserved:                LONGINT;                                {  fill with 0x00  }
  369.         inputChannels:            SInt8;                                    {   }
  370.         outputChannels:            SInt8;                                    {   }
  371.         gridPoints:                SInt8;                                    {   }
  372.         reserved2:                SInt8;                                    {  fill with 0x00  }
  373.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  374.         inputTable:                PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  375.         CLUT:                    PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  376.         outputTable:            PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  377.     END;
  378.  
  379.     CMMeasurementTypePtr = ^CMMeasurementType;
  380.     CMMeasurementType = RECORD
  381.         typeDescriptor:            OSType;                                    {  'meas'  }
  382.         reserved:                LONGINT;                                {  fill with 0x00  }
  383.         standardObserver:        LONGINT;                                {  0 : unknown, 1 : CIE 1931, 2 : CIE 1964  }
  384.         backingXYZ:                CMFixedXYZColor;                        {  absolute XYZ values of backing  }
  385.         geometry:                LONGINT;                                {  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0  }
  386.         flare:                    LONGINT;                                {  0 : 0%, 1 : 100% flare  }
  387.         illuminant:                LONGINT;                                {  standard illuminant  }
  388.     END;
  389.  
  390.     CMNamedColorTypePtr = ^CMNamedColorType;
  391.     CMNamedColorType = RECORD
  392.         typeDescriptor:            OSType;                                    {  'ncol'  }
  393.         reserved:                LONGINT;                                {  fill with 0x00  }
  394.         vendorFlag:                LONGINT;                                {   }
  395.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  396.         prefixName:                SInt8;                                    {  Variable size, max = 32, to access fields after this one, have to count bytes  }
  397.         suffixName:                SInt8;                                    {  Variable size, max = 32  }
  398.         data:                    SInt8;                                    {  varaible size data as explained below  }
  399.     END;
  400.  
  401. {
  402.     A variable size array of structs appears as the last block of data
  403.     in the above struct, CMNamedColorType.  The data structure
  404.     is as follows: (example in C)
  405.     
  406.      struct (                                             
  407.             unsigned char    rootName[1];                 * Variable size, max = 32 
  408.             unsigned char    colorCoords[1];                 * Variable size  
  409.      ) colorName[1];                                     * Variable size  
  410. }
  411.     CMNamedColor2TypePtr = ^CMNamedColor2Type;
  412.     CMNamedColor2Type = RECORD
  413.         typeDescriptor:            OSType;                                    {  'ncl2'  }
  414.         reserved:                LONGINT;                                {  fill with 0x00  }
  415.         vendorFlag:                LONGINT;                                {  lower 16 bits reserved for ICC use  }
  416.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  417.         deviceChannelCount:        LONGINT;                                {  number of device channels, 0 indicates no device value available  }
  418.         prefixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  419.         suffixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  420.         data:                    SInt8;                                    {  varaible size data as explained below  }
  421.     END;
  422.  
  423. {
  424.     A variable size array of structs appears as the last block of data
  425.     in the above struct, CMNamedColor2Type.  The data structure
  426.     is as follows: (example in C)
  427.     
  428.      struct (                                             
  429.             unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  430.             unsigned char    PCSColorCoords[1];             * Variable size  
  431.             unsigned char    DeviceColorCoords[1];         * Variable size  
  432.      ) colorName2[1];                                     * Variable size  
  433. }
  434.     CMTextDescriptionTypePtr = ^CMTextDescriptionType;
  435.     CMTextDescriptionType = PACKED RECORD
  436.         typeDescriptor:            OSType;                                    {  'desc'  }
  437.         reserved:                LONGINT;                                {  fill with 0x00  }
  438.         ASCIICount:                LONGINT;                                {  the count of "bytes"  }
  439.         ASCIIName:                PACKED ARRAY [0..1] OF UInt8;            {  Variable size, to access fields after this one, have to count bytes  }
  440.         UniCodeCode:            LONGINT;
  441.         UniCodeCount:            LONGINT;                                {  the count of characters, each character has two bytes  }
  442.         UniCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  443.         ScriptCodeCode:            INTEGER;
  444.         ScriptCodeCount:        UInt8;                                    {  the count of "bytes"  }
  445.         ScriptCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  446.     END;
  447.  
  448.     CMTextTypePtr = ^CMTextType;
  449.     CMTextType = RECORD
  450.         typeDescriptor:            OSType;                                    {  'text'  }
  451.         reserved:                LONGINT;                                {  fill with 0x00  }
  452.         text:                    SInt8;                                    {  count of text is obtained from tag size element  }
  453.     END;
  454.  
  455.     CMScreeningTypePtr = ^CMScreeningType;
  456.     CMScreeningType = RECORD
  457.         typeDescriptor:            OSType;                                    {  'scrn'  }
  458.         reserved:                LONGINT;                                {  fill with 0x00  }
  459.         screeningFlag:            LONGINT;                                {  bit 0 : use printer default screens, bit 1 : inch/cm  }
  460.         channelCount:            LONGINT;
  461.         data:                    SInt8;                                    {  varaible size data as explained below  }
  462.     END;
  463.  
  464. {
  465.     A variable size array of structs appears as the last block of data
  466.     in the above struct, CMScreeningType.  The data structure
  467.     is as follows: (example in C)
  468.     
  469.     struct (
  470.         Fixed            frequency;
  471.         Fixed            angle;
  472.         unsigned long    sportFunction;
  473.      )    channelScreening[1];                             * Variable size 
  474. }
  475.     CMSignatureTypePtr = ^CMSignatureType;
  476.     CMSignatureType = RECORD
  477.         typeDescriptor:            OSType;                                    {  'sig '  }
  478.         reserved:                LONGINT;                                {  fill with 0x00  }
  479.         signature:                OSType;
  480.     END;
  481.  
  482.     CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
  483.     CMS15Fixed16ArrayType = RECORD
  484.         typeDescriptor:            OSType;                                    {  'sf32'  }
  485.         reserved:                LONGINT;                                {  fill with 0x00  }
  486.         value:                    ARRAY [0..0] OF Fixed;                    {  Variable size  }
  487.     END;
  488.  
  489.     CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
  490.     CMU16Fixed16ArrayType = RECORD
  491.         typeDescriptor:            OSType;                                    {  'uf32'  }
  492.         reserved:                LONGINT;                                {  fill with 0x00  }
  493.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  494.     END;
  495.  
  496.     CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
  497.     CMUInt16ArrayType = RECORD
  498.         typeDescriptor:            OSType;                                    {  'ui16'  }
  499.         reserved:                LONGINT;                                {  fill with 0x00  }
  500.         value:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  501.     END;
  502.  
  503.     CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
  504.     CMUInt32ArrayType = RECORD
  505.         typeDescriptor:            OSType;                                    {  'ui32'  }
  506.         reserved:                LONGINT;                                {  fill with 0x00  }
  507.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  508.     END;
  509.  
  510.     CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
  511.     CMUInt64ArrayType = RECORD
  512.         typeDescriptor:            OSType;                                    {  'ui64'  }
  513.         reserved:                LONGINT;                                {  fill with 0x00  }
  514.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size (x2)  }
  515.     END;
  516.  
  517.     CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
  518.     CMUInt8ArrayType = RECORD
  519.         typeDescriptor:            OSType;                                    {  'ui08'  }
  520.         reserved:                LONGINT;                                {  fill with 0x00  }
  521.         value:                    SInt8;                                    {  Variable size  }
  522.     END;
  523.  
  524.     CMViewingConditionsTypePtr = ^CMViewingConditionsType;
  525.     CMViewingConditionsType = RECORD
  526.         typeDescriptor:            OSType;                                    {  'view'  }
  527.         reserved:                LONGINT;                                {  fill with 0x00  }
  528.         illuminant:                CMFixedXYZColor;                        {  absolute XYZs of illuminant  in cd/m^2  }
  529.         surround:                CMFixedXYZColor;                        {  absolute XYZs of surround in cd/m^2  }
  530.         stdIlluminant:            LONGINT;                                {  see definitions of std illuminants  }
  531.     END;
  532.  
  533.     CMXYZTypePtr = ^CMXYZType;
  534.     CMXYZType = RECORD
  535.         typeDescriptor:            OSType;                                    {  'XYZ '  }
  536.         reserved:                LONGINT;                                {  fill with 0x00  }
  537.         XYZ:                    ARRAY [0..0] OF CMFixedXYZColor;        {  variable size XYZ tristimulus values  }
  538.     END;
  539.  
  540. {  Profile sequence description type  }
  541.     CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
  542.     CMProfileSequenceDescType = RECORD
  543.         typeDescriptor:            OSType;                                    {  'pseq '  }
  544.         reserved:                LONGINT;                                {  fill with 0x00  }
  545.         count:                    LONGINT;                                {  Number of descriptions  }
  546.         data:                    SInt8;                                    {  varaible size data as explained below  }
  547.     END;
  548.  
  549. {
  550.     A variable size array of structs appears as the last block of data
  551.     in the above struct, CMProfileSequenceDescType.  The data structure
  552.     is as follows: (example in C)
  553.     
  554.      struct (                                             
  555.             OSType            deviceMfg;                     * Device Manufacturer 
  556.             OSType            deviceModel;                 * Decvice Model 
  557.             unsigned long    attributes[2];                 * Device attributes 
  558.             OSType            technology;                     * Technology signature 
  559.             unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  560.             unsigned char    mfgDescASCIIName[2];         * Variable size 
  561.             unsigned long    mfgDescUniCodeCode;             
  562.             unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  563.             unsigned char    mfgDescUniCodeName[2];         * Variable size 
  564.             unsigned long    mfgDescScriptCodeCode;         
  565.             unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  566.             unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  567.             unsigned long    modelDescASCIICount;         * the count of "bytes" 
  568.             unsigned char    modelDescASCIIName[2];         * Variable size 
  569.             unsigned long    modelDescUniCodeCode;         
  570.             unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  571.             unsigned char    modelDescUniCodeName[2];     * Variable size 
  572.             short            modelDescScriptCodeCode;     
  573.             unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  574.             SInt8            filler;                         * For proper alignment across languages 
  575.             unsigned char    modelDescScriptCodeName[2];     * Variable size 
  576.      )    profileDescription[1];                         
  577. }
  578. {  Under color removal, black generation type  }
  579.     CMUcrBgTypePtr = ^CMUcrBgType;
  580.     CMUcrBgType = RECORD
  581.         typeDescriptor:            OSType;                                    {  'bfd  '  }
  582.         reserved:                LONGINT;                                {  fill with 0x00  }
  583.         ucrCount:                LONGINT;                                {  Number of UCR entries  }
  584.         ucrValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  585.         bgCount:                LONGINT;                                {  Number of BG entries  }
  586.         bgValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  587.         ucrbgASCII:                SInt8;                                    {  null terminated ASCII string  }
  588.     END;
  589.  
  590.     CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
  591.     CMIntentCRDVMSize = RECORD
  592.         renderingIntent:        LONGINT;                                {  rendering intent  }
  593.         VMSize:                    LONGINT;                                {  VM size taken up by the CRD  }
  594.     END;
  595.  
  596.     CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
  597.     CMPS2CRDVMSizeType = RECORD
  598.         typeDescriptor:            OSType;                                    {  'psvm'  }
  599.         reserved:                LONGINT;                                {  fill with 0x00  }
  600.         count:                    LONGINT;                                {  number of intent entries  }
  601.         intentCRD:                ARRAY [0..0] OF CMIntentCRDVMSize;        {  variable size  }
  602.     END;
  603.  
  604. { ********************************************************************** }
  605. { ************** ColorSync 1.0 profile specification ******************* }
  606. { ********************************************************************** }
  607.  
  608. CONST
  609.     cmGrayResponse                = 0;
  610.     cmRedResponse                = 1;
  611.     cmGreenResponse                = 2;
  612.     cmBlueResponse                = 3;
  613.     cmCyanResponse                = 4;
  614.     cmMagentaResponse            = 5;
  615.     cmYellowResponse            = 6;
  616.     cmUcrResponse                = 7;
  617.     cmBgResponse                = 8;
  618.     cmOnePlusLastResponse        = 9;
  619.  
  620. {  Device types  }
  621.     cmMonitorDevice                = 'mntr';
  622.     cmScannerDevice                = 'scnr';
  623.     cmPrinterDevice                = 'prtr';
  624.  
  625.  
  626. TYPE
  627.     CMIStringPtr = ^CMIString;
  628.     CMIString = RECORD
  629.         theScript:                ScriptCode;
  630.         theString:                Str63;
  631.     END;
  632.  
  633. {  Profile options  }
  634.  
  635. CONST
  636.     cmPerceptualMatch            = $0000;                        {  Default. For photographic images  }
  637.     cmColorimetricMatch            = $0001;                        {  Exact matching when possible  }
  638.     cmSaturationMatch            = $0002;                        {  For solid colors  }
  639.  
  640. {  Profile flags  }
  641.     cmNativeMatchingPreferred    = $00000001;                    {  Default to native not preferred  }
  642.     cmTurnOffCache                = $00000002;                    {  Default to turn on CMM cache  }
  643.  
  644.  
  645. TYPE
  646.     CMMatchOption                        = LONGINT;
  647.     CMMatchFlag                            = LONGINT;
  648.     CMHeaderPtr = ^CMHeader;
  649.     CMHeader = RECORD
  650.         size:                    LONGINT;
  651.         CMMType:                OSType;
  652.         applProfileVersion:        LONGINT;
  653.         dataType:                OSType;
  654.         deviceType:                OSType;
  655.         deviceManufacturer:        OSType;
  656.         deviceModel:            LONGINT;
  657.         deviceAttributes:        ARRAY [0..1] OF LONGINT;
  658.         profileNameOffset:        LONGINT;
  659.         customDataOffset:        LONGINT;
  660.         flags:                    CMMatchFlag;
  661.         options:                CMMatchOption;
  662.         white:                    CMXYZColor;
  663.         black:                    CMXYZColor;
  664.     END;
  665.  
  666.     CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
  667.     CMProfileChromaticities = RECORD
  668.         red:                    CMXYZColor;
  669.         green:                    CMXYZColor;
  670.         blue:                    CMXYZColor;
  671.         cyan:                    CMXYZColor;
  672.         magenta:                CMXYZColor;
  673.         yellow:                    CMXYZColor;
  674.     END;
  675.  
  676.     CMProfileResponsePtr = ^CMProfileResponse;
  677.     CMProfileResponse = RECORD
  678.         counts:                    ARRAY [0..8] OF INTEGER;
  679.         data:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  680.     END;
  681.  
  682.     CMProfilePtr = ^CMProfile;
  683.     CMProfile = RECORD
  684.         header:                    CMHeader;
  685.         profile:                CMProfileChromaticities;
  686.         response:                CMProfileResponse;
  687.         profileName:            CMIString;
  688.         customData:                SInt8;                                    {  Variable size  }
  689.     END;
  690.  
  691.     CMProfileHandle                        = ^CMProfilePtr;
  692. {$IFC OLDROUTINENAMES }
  693.  
  694. CONST
  695.     kCMApplProfileVersion        = $00000100;
  696.  
  697.     grayResponse                = 0;
  698.     redResponse                    = 1;
  699.     greenResponse                = 2;
  700.     blueResponse                = 3;
  701.     cyanResponse                = 4;
  702.     magentaResponse                = 5;
  703.     yellowResponse                = 6;
  704.     ucrResponse                    = 7;
  705.     bgResponse                    = 8;
  706.     onePlusLastResponse            = 9;
  707.  
  708.     rgbData                        = 'RGB ';
  709.     cmykData                    = 'CMYK';
  710.     grayData                    = 'GRAY';
  711.     xyzData                        = 'XYZ ';
  712.  
  713.     monitorDevice                = 'mntr';
  714.     scannerDevice                = 'scnr';
  715.     printerDevice                = 'prtr';
  716.  
  717.  
  718. TYPE
  719.     XYZComponent                        = INTEGER;
  720.     XYZColor                            = CMXYZColor;
  721.     XYZColorPtr                         = ^XYZColor;
  722.     CMResponseData                        = INTEGER;
  723.     IString                                = CMIString;
  724.     IStringPtr                             = ^IString;
  725.     CMResponseColor                        = LONGINT;
  726.     responseColor                        = CMResponseColor;
  727. {$ENDC}
  728. {$ALIGN RESET}
  729. {$POP}
  730.  
  731. {$SETC UsingIncludes := CMICCProfileIncludes}
  732.  
  733. {$ENDC} {__CMICCPROFILE__}
  734.  
  735. {$IFC NOT UsingIncludes}
  736.  END.
  737. {$ENDC}
  738.